From: Jasper St. Pierre Date: Wed, 3 Oct 2012 05:22:46 +0000 (-0300) Subject: dash: Only set the label's text when initially showing the label X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5648 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6487cd8c6f415d4050efcd0228875fca4f090c34;p=gnome-shell.git dash: Only set the label's text when initially showing the label Having the tooltip change when it's visible looks strange and glitchy. This also makes sure that "Remove from Favorites" doesn't change, even when the user removes their mouse cursor from it. https://bugzilla.gnome.org/show_bug.cgi?id=685313 --- diff --git a/js/ui/dash.js b/js/ui/dash.js index 215bd6f35..dc08b68ab 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -48,6 +48,7 @@ const DashItemContainer = new Lang.Class({ Lang.bind(this, this._allocate)); this.actor._delegate = this; + this._labelText = ""; this.label = new St.Label({ style_class: 'dash-label'}); this.label.hide(); Main.layoutManager.addChrome(this.label); @@ -106,6 +107,10 @@ const DashItemContainer = new Lang.Class({ }, showLabel: function() { + if (!this._labelText) + return; + + this.label.set_text(this._labelText); this.label.opacity = 0; this.label.show(); @@ -136,7 +141,7 @@ const DashItemContainer = new Lang.Class({ }, setLabelText: function(text) { - this.label.set_text(text); + this._labelText = text; }, hideLabel: function () {